package se19team1e.dao.abstrakt.jaas;

import java.util.List;

import se19team1e.dao.abstrakt.generics.DataAccessObject;
import se19team1e.entity.DepartmentDTO;
import se19team1e.exception.DataAccessException;

/**
 * An abstract DAO interface to manipulate the department objects in the
 * persistence storage.
 * 
 * <p>
 * This interface is referenced by controllers, such that the underlying
 * persistence mechanism can be swapped out easily in the future.
 * </p>
 * 
 * @author Nasri Bin Najib
 * 
 */
public interface DepartmentDAO extends DataAccessObject<DepartmentDTO> {

	/**
	 * Retrieve all Department objects in the persistence storage.
	 * 
	 * @return list of Department DataTransfer objects
	 * @throws DataAccessException
	 */

	@Override
	public List<DepartmentDTO> retrieveAll() throws DataAccessException;

	/**
	 * Create the Department DAO using interface DataAccessObject
	 * 
	 * @param DepartmentDTO
	 *            The Department dto
	 * @throws DataAccessException
	 */
	@Override
	public boolean create(DepartmentDTO dtoType) throws DataAccessException;

	/**
	 * Deletes an existing Department object from the persistence storage by the
	 * given id.
	 * 
	 * @param idType
	 *            ID of the Department object to be deleted
	 * @return boolean true if success
	 * @throws DataAccessException
	 */
	@Override
	public boolean delete(Object idType) throws DataAccessException;

	/**
	 * Gets an existing Department object from the persistence storage by the
	 * given id.
	 * 
	 * @param idType
	 *            ID of the Department object
	 * @return Object Department object specified by the ID
	 * @throws DataAccessException
	 */
	@Override
	public DepartmentDTO retrieveById(Object idType) throws DataAccessException;

	/**
	 * Updates the delta of an existing Department object to the persistence
	 * storage.
	 * 
	 * @param AccountDTO
	 *            dto type is Department
	 * @return Object which is an updated Department DTO
	 * @throws DataAccessException
	 */
	@Override
	public DepartmentDTO update(DepartmentDTO dtoType)
			throws DataAccessException;

}
